'''
@author: pnuzhnyi
'''

from events.models import event, event_winner
from django.contrib import admin

class event_admin(admin.ModelAdmin):
    fields = ["name","description","img","location","when","fee","prize","conditions_dump","status"]
    list_display = ('id', 'name', 'description','status','when')
    list_filter = ['status']
    search_fields = ['name']
    #date_hierarchy = 'when'

class event_winner_admin(admin.ModelAdmin):
    list_display = ("event_id","participant_id","place","updated","notified","compensation")
    list_filter = ['updated','notified']
    #search_fields = ['name']
    #date_hierarchy = 'when'

    
  
 
admin.site.register(event,event_admin)
admin.site.register(event_winner,event_winner_admin)